package reflection.equals.correct;

public class BusinessObject {

	protected Long id;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Override
	public boolean equals(Object obj) {

		if (obj == null) {
			return false;
		} else if (this == obj) {
			return true;
		}

		if (!this.getClass().equals(obj.getClass())) {
			return false;
		}

		System.out.println("this" + this.getClass() + " --- " + "obj" + obj.getClass());
		
		
		BusinessObject object = (BusinessObject) obj;

		return id.equals(object.getId());
	}

}
